-- GENERATED SPELL FOR [Wastewalker Slave] --


function spell0_17963(pUnit, Event) --@Elemental Armor,Self--
pUnit:FullCastSpellOnTarget(34880,pUnit)
pUnit:RegisterEvent('Sorts_17963', 0, 1)
end

function spell1_17963(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(15531,pUnit)
pUnit:RegisterEvent('Sorts_17963', 8297, 1)
end

function spell2_17963(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(32192,pUnit)
pUnit:RegisterEvent('Sorts_17963', 5250, 1)
end

function spell3_17963(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(12675,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17963', 7000, 1)
end

function spell4_17963(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(15497,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_17963', 7000, 1)
end

function Sorts_17963(pUnit, Event)
local choix_sorts_17963 = math.random(0, 4)
if choix_sorts_17963 == 0 then
pUnit:RegisterEvent('spell0_17963', 1, 1)
end
if choix_sorts_17963 == 1 then
pUnit:RegisterEvent('spell1_17963', 1, 1)
end
if choix_sorts_17963 == 2 then
pUnit:RegisterEvent('spell2_17963', 1, 1)
end
if choix_sorts_17963 == 3 then
pUnit:RegisterEvent('spell3_17963', 1, 1)
end
if choix_sorts_17963 == 4 then
pUnit:RegisterEvent('spell4_17963', 1, 1)
end
end

function mob17963_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_17963', math.random(1500, 3000), 1)
end

function mob17963_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17963_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob17963_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(17963, 1, 'mob17963_Action')
RegisterUnitEvent(17963, 2, 'mob17963_Leave')
RegisterUnitEvent(17963, 3, 'mob17963_Kill')
RegisterUnitEvent(17963, 4, 'mob17963_Die')
